home *** CD-ROM | disk | FTP | other *** search
- A GENERAL TOUR AROUND AMOS
- ****************************
-
- The info within this file is just basic stuff to help you get started-
- But do read it carefully,as you might learn something you didn't know!
-
-
- --------------How to Use "AMOSSIBLE-The Total Beginners Guide"---------------
-
- The main purpose behind this disk is to give you a basic knowledge of
- programming in AMOS(And even programming in general).
- To gain the most from this disk,you should follow these guidelines:
-
- IF YOU HAVE ANY TROUBLE UNDERSTANDING ANY OF THE WORDS WRITTEN ON THE
- DISK,LOOK AT THE DEFINITIONS FILE,WHICH IS ALSO ON THE DISK.
-
- First,get a pen and some paper,you'll probably need to make notes on every
- subject(You can refer back to each section,but writing some keypoints down
- will help to make it even clearer).
- Make sure you read all of those `docs'(text files)-We've included these so
- that we can write a large amount on certain subjects-Which will hopefully
- make things alot clearer for you.
- When studying the AMOS code,experiment with it-Try adjusting one variable
- to see what it affects,or try adding a few more lines to see how they change
- the entire program.
- Read your AMOS manual again-This might seem like odd advice,but when you
- have seen some examples on this disk you might stand a better chance of
- understanding how a command works.
- But the real things you need are a bit of patience and bags of
- enthusiasm-Without the will to actually LEARN about AMOS,you will have a
- real struggle on your hands.
- Don't expect to be able to make a game in a month-Start simple with
- little programs,then build up steadily,and by the time you're ready to make
- a game,it will seem to come easily.
-
- *****************************************************************************
- P S E U D O C O D E
- =================================
-
- What?
- Pseudo code isn't actually a language,and it isn't essential to your
- programming success-But it can be incredibly handy when designing your
- projects.
- When you type in a program in AMOS(Or any programming language),you have to
- make sure all that you type in is in the correct language and the correct
- syntax(in other words,all the dots,lines and squiggles are in the right
- places,and all the commands are in the right order),but this is a pain when
- working out the program,especially if you're a beginner.
- A clever way of getting around this is to write out a plan of the program
- in a near-English dialect called "Pseudo Code".
- Instead of writing out "X=X-1",you might just write "Decrease the X
- variable",or an alternative to "Screen Open 0,320,256,32,lowres",would be
- "Open a 32 colour low resolution screen"-The idea is to write a more
- understandable version of the line-In fact if you can see how to write a
- `good' pseudo code program,you'll find it alot easier to do the real
- thing-The more planning you do before hand,the faster you'll be able to
- work-Many problems or mistakes can be eliminated at this stage,which saves
- you from alot of hassle later on.
- The thing to remember is that pseudo code is just a planning aid;If you
- entered it into AMOS and tried to `run' it,nothing would happen-Or you'd get
- alot of errors.
-
- As a simple example of a games program,here is a small listing written in a
- sort of Pseudo code.
- The `game' places the player(in a `space ship')on screen,the player moves
- the ship around with the joystick,but must try to avoid a few land mines
- which are placed near it.
-
-
- Open screen zero in 32 colour low resolution.
- Turn flashing cursor off.
- Clear screen in colour zero.
- Load Bob bank.
- Get Bob banks colours.
- Define X variable.
- Define Y variable.
- Place first land mine Bob on screen.
- Place Second land mine Bob on screen.
- Place third land mine Bob on screen.
- Place fourth land mine Bob on screen.
- Start main loop.
- If joystick 1 is pushed left decrease X variable.
- If joystick 1 is pushed right increase X variable.
- If joystick 1 is pushed up decrease Y variable.
- If joystick 1 is pushed down increase Y variable.
- Place players Bob on screen.
- If there is a collision between the player and mines then display a
- game over message,wait for a second,then end the program.
- Return to the start of the main loop.
-
-
- Now heres how you'd write that program for real in AMOS:
- (You'll have to create your own Bob bank to use this example-Bob 1(In the
- main loop)is the player,and Bobs 2 to 5 are the land mines-The Bob banks
- name here is "Blobs.Abk")
-
- Screen Open 0,320,256,32,Lowres
- Flash off:Curs off
- Cls 0
- Load "Blobs.Abk"
- Get Bob Palette
- X=150
- Y=100
- Bob 2,20,20,2
- Bob 3,290,20,2
- Bob 4,20,180,2
- Bob 5,290,180,2
- Do
- If Joy(1)=4 Then X=X-1
- If Joy(1)=8 Then X=X+1
- If Joy(1)=1 Then Y=Y-1
- If Joy(1)=2 Then Y=Y+1
- Bob 1,X,Y,1
- If Bob Col(1,2 to 5)Then Print At(10,7);"Blown Up!":Wait 50:Edit
- Loop
-
-
- *****************************************************************************
-
- ----How Does A Program Work?----
-
- Okay,so some of you out there might be experienced enough to know a bit
- about the structuring of a program,but for the benefit of Total
- Beginners,heres a summary.
- When you enter some commands into a program editor,you usually have an
- aim-You want the computer to do something for you-So you enter commands
- in certain combinations to hopefully make it work correctly,when you've done
- this,you must `Run' the program;What this involves is the computer reads
- through the commands you have typed in,and if they are correctly typed,it
- will perform the tasks they `ask' it to.It will usually read through the
- commands from the top to the bottom of the screen(and scroll further down if
- you have entered alot of lines),but some times,you may have told it to jump
- to a certain collection of commands(Known as a "Subroutine"),where the
- commands will be carried out,then it can be sent back to where it left off
- if you so wish.
- There is no hard and fast way of starting off a program,but it will
- usually begin with the opening of relevant screens,and setting up variables.
- Then any Bobs or Sprites,sounds,music and various other bits of
- information can be loaded in.
- Starting with a `label',the main part of the program comes next,this
- usually contains the most important parts of the program,which are `used'
- alot of the time.
- In a `shoot 'em up' like "Space Invaders" for instance,the main part of
- the program (Or "loop" as its called)might contain various commands that
- test for collisions between the moving objects on screen,any joystick
- movements,or any statistic changes(The `energy' of the player,for example)
- -from these tests,the computer will either get a positive or negative
- response(in general,that is-That isn't to say there can't be many different
- ones,but this is a simple example)-If the result is positive(Such as
- joystick movement being detected)then the program will react to it there and
- then,or be sent on to a subroutine-which makes its own various checks-And
- then returns to the main program(Typically with a "Return" or "Goto"
- command).
- Also included in the main program will be checks for collisions between
- the enemies and player,changes to the score,and tests for any of the
- specific victory(Or defeat)conditions.
- Obviously,a game can have far more features than this,or less-It all
- depends on what you want the program to do.
-
- *****************************************************************************
- GAMES MAKING
-
- As this is officially a `Beginners Guide',we don't intend to go too deeply
- into the world of games making,as its a very complicated area and is handled
- in the other `AMOSSIBLE' disks(Especially "AMOSSIBLE 2")-So check out the
- "Catalogue" file for more info.
- To start you off though,you'll need to refer to the programs that
- specifically deal with Bobs(We use Bobs instead of Sprites simply because
- they are alot more versatile and alot easier to handle)and other aspects
- that can be linked with games-Such as sound,mathematics,and other graphics.
- You really need to understand how a game works first of all-You don't
- even have to know how to write one yet-A knowledge of what actually happens
- at each stage of a game is invaluable.
- Almost every game-Whether its a flight simulator or Shoot 'em Up-Has what
- we in `the trade' call a "Main Game Loop",all this involves is the various
- aspects of controlling the player and their foes.
- Main elements include:
- Altering the horizontal and vertical positions of the players Bob if they
- move the Joystick(Or mouse,or even keyboard if you want to).
- Shooting a bullet `from' the players Bob if they press the fire button.
- Checking to see if the bullet has hit anything,or if the player has been
- hit by enemy fire.
- If anything has been hit,adjust their energy levels.
- If energy levels are zero,take the `dead' things off of the screen.
- Alter the score if neccesary.
- Return to the start of the loop.
-
- When designing a game,write down(In order) the things that you want the
- computer to check for.Eg Joystick movement,collisions etc. and what things
- happen at certain points(Do any of the player foes move?If so,adjust their
- positions).
-
- *****************************************************************************
-
- ROUGH GUIDE TO AMOS
-
-
- So you're new to AMOS,eh?
-
- This section is a whizz through various areas of AMOS that you'll come
- across.
-
- PICTURES(IFF SCREENS):
- So you've bought AMOS,but you've(probably)already used a paint
- package-Something like the vastly popular "Deluxe Paint" series,and after a
- week or so of using it,you should have saved a picture onto a disk.
- You can now load upto 8 pictures into AMOS at one time,and display them in
- a variety of ways,activating a number of effects if you wish to.
-
- BOBS AND SPRITES:
- From a space invader to a Teenage mutant Ninja terrapin,the name of the
- special type of graphics that fly around screen(Or sometimes stay still)can
- be Bobs or Sprites.
- A Bob is a Blitter Object,which means it is controlled by the Amigas
- Blitter chip.
- The Bob is the little brother of the Sprite,which,while having a number of
- size and display restrictions,uses very little memory and can be moved
- around screen very fast.
- Basically Bobs can be drawn in upto 64 colours,and there can be upto 64
- of them on screen(There are ways of changing the number allowed,but don't
- worry about that for the moment),but they move slowly when compared to
- sprites-Who are limited to 15 colours and amximum size of 16 pixels wide and
- 255 pixels high.
- What you use is upto you-Weigh up the alternatives-You can actually use
- Sprites and Bobs on screen at the same time if you really want to!
- One thing you should note is;You may see an object on screen with many
- moving parts-This is most likely to have been made up of several different
- Bobs or Sprites placed closely together.
- A Sprite or Bob is more likely to be used as something which the player/
- user interacts with in some way.
- In a typical game,Bobs/Sprites will include:
- The players `ship',any weapons fired from the ship,aliens,and any weapons
- that they fire-Plus bonus items and any number of other things.
- PLEASE NOTE THAT DUE TO THE RESTRICTIONS MADE BY ITS MAKERS,EASY AMOS DOES
- NOT USE SPRITES.
-
- AMAL:
- For games,a knowledge of AMAL is sometimes invaluable."Easy AMOS" owners
- should note that AMAL is not available to them,but the cost of an upgrade to
- "AMOS 1.3" is small(A back issue of "CU Amiga" or "Amiga Format" will give
- it you for about £4-They both had it on recent cover disks).
- AMAL is the facility in AMOS that allows Bobs,Sprites,and even screens to
- be moved and `animated'.
- AMAL uses its own set of instructions,and can operate seperately from the
- main program when activated.
-
- BACKGROUNDS,MAPS AND TILES:
- Unlike a normal picture which you create in Deluxe Paint and just load in,
- some programs(especially games)require very large screens(Which they scroll
- through)-But the larger the screen,the more valuable memory is used up.
- To solve this problem,some clever people thought that most screens have
- certain areas that look the same(Eg.Brick walls,floors etc.)-So why not take
- a few of these main elements and put them in small squares called
- "Tiles"-These tiles can then be placed over the screen,but because you may
- only use 6(For example)small chunks of graphics,and repeatedly place them
- around the screen,you use alot less memory than one big picture.
- Each tile can be given a special number,and using this,you can set up
- various routines to detect if a `player' has entered a certain area of the
- screen,and then you can create a reaction.
- If you've ever played "Super Mario" you'll know that you can't just walk
- through the scenary-Some bits of it affect you in diffent ways.In "Super
- Sprint" you can't dive anywhere and in "Lemmings",your little pals can't
- just walk anywhere-This is all due to these screens made out of tiles-A
- screen made out of tiles is called a "Map".
- You may have heard about "TOME"(The Total Map Editor),this is an extension
- for AMOS and makes the creation of these maps alot easier,and it is
- available from Shadow software via the Official AMOS PD library.
-
-
- SAMPLED SOUND AND MUSIC:
- Listen....Nothing?Ah well,AMOS can bring your creations to life with
- dramatic sound effects and a sweeping soundtrack.
- For the sound effects,you can utilize the Amigas hardware and AMOS'
- commands,or load in some sampled sounds from a sampler such as "AMAS".
- Music can come from several sources,the most common being a `tracker'
- -A tracker(Or sequencer) is a computer utility which allows the user to
- enter musical notes `into' any of the Amigas four sound channels(Or tracks)
- via the keyboard and then play them back in sequence.
- You can find trackers such as "MED" and "SoundTracker" in most Public
- Domain libraries.
-
-
-
- *****************************************************************************
-
- FLOWCHARTS
-
- A small note on this useful planning aid.
- As a form of strict planning,you can write out a flow chart of your
- programs.
- A flowchart consists of a chain of events and then any reactions that lead
- from them-All you have to do is write one down on paper.
- This may seem a waste of time,but it can eliminate an awful lot of wasted
- time.
- You may think you've worked out the perfect program,but "Many a slip twix
- cup and lip"(Or in plain english"Theres still plenty that could go wrong!")
- -If you write down EXACTLY what the computer will do at each stage(And what
- results it will produce),you might come across mistakes you hadn't noticed.
-
-
-
-
-
-
-
-
-
-
-
-